package com.arknights.web.controller;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(urlPatterns = "/cservlet")
public class CityServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            this.doGet(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setCharacterEncoding("utf-8");
        String[] citys ={"苏州,南京,无锡,南通","成都,绵阳,攀枝花","广州,深圳,东莞","杭州,金华,温州"};
        String shen = request.getParameter("shen");
        response.getWriter().print(citys[Integer.parseInt(shen)]);

    }
}
